/*
 * @Description:弹窗封装管理
 */

const dialogMount = {}

// 指令名以大写字母开头，中间全小写，否则jest会报错
dialogMount.install = function (Vue, option = {}) {
  // 溢出隐藏显示title
  Vue.directive('mountInstance', {
    bind: function (el, binding) {
      if (el.__vue__) Vue.prototype.$dialogInstance = el.__vue__
    },
    inserted: function (el, binding) {
      if (el.__vue__) Vue.prototype.$dialogInstance = el.__vue__
    },
  })
}

export default dialogMount
